﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Beacon.SPC
{
    public interface Inspection<T>
    {
        bool check(T t);
    }

    public class ScalarInspection : Inspection<double>
    {
        #region Members
        private double _upperLimit = double.NaN;
        private double _lowerLimit = double.NaN;
        #endregion

        #region Constructor

        public ScalarInspection(double upper, double lower)
        {
            _upperLimit = upper;
            _lowerLimit = lower;
        }

        #endregion

        #region Inspection<double> Members

        public bool check(double t)
        {
            return t < _upperLimit && t > _lowerLimit;
        }

        #endregion
    }
}
